1. Field of the Invention
The present invention relates to an image processing apparatus that processes an image read by a reading unit, an image processing method, and a storage medium storing a program.
2. Description of the Related Art
Methods for reading an image of an original are conventionally known, examples of which include a method for reading an image by moving an optical system, such as image sensors, so as to scan an original placed on an original plate to be read, and a method for reading an image by moving an original to be read with respect to a fixed optical system.
Also, an inkjet printing apparatus that executes printing by discharging ink from a printing head may execute optical reading to adjust printing positions. That is to say, the inkjet printing apparatus can specify a printing condition with a small displacement in printing positions by printing a test chart for adjusting the printing positions on a printing medium and by optically reading the printed test chart. More specifically, a test chart including a plurality of patterns corresponding to different printing conditions is printed on a printing medium. After optically reading the printed test chart, a printing condition corresponding to one of the plurality of patterns with a small printing displacement is specified, and a correction value for the actual image printing is determined in accordance with the specified printing condition. This makes it possible to adjust a displacement in printing positions attributed to, for example, error in the manufacturing accuracy and assembly during a manufacturing process for the printing head.
However, in this case, if a reading displacement and the like have occurred at the time of image reading, a displacement in printing positions cannot be adjusted appropriately. In view of this, Japanese Patent Laid-Open No. 8-97974 suggests detection of displacement amounts of reading start positions in a main scanning direction and a sub scanning direction by reading a reference original on which an image of reference data is printed.
In the aforementioned methods for optically reading an image, the read image may be distorted due to, for example, the following reasons. Aberration of an optical system caused by, for example, an error in manufacturing accuracy and assembly during a manufacturing process for the optical system may alter a scale factor in the main scanning direction, and hence distort the read image. Also, the driving accuracy of a driving system that drives the optical system and an original to be read may alter a scale factor in the sub scanning direction, and hence distort the read image. Furthermore, the read image could possibly be distorted if an image is read by moving the optical system and the original to be read in the state where a column direction of elements (pixels) of line-type image sensors (the main scanning direction) is not perpendicular to the sub scanning direction. Moreover, depending on the accuracy at which a member for guiding the movement of the optical system is formed, the read image could possibly be distorted if an angle of a pixel column direction of the image sensors changes in accordance with the movement of the optical system.
However, with Japanese Patent Laid-Open No. 8-97974, the aforementioned distortion of the read image cannot be fixed. That is to say, merely detecting the displacement amounts of the reading start positions in the main scanning direction and the sub scanning direction can do nothing but shift the read image in the main scanning direction or the sub scanning direction as a whole, thereby leaving the read image in a distorted state. Therefore, the aforementioned displacement in the printing positions cannot be adjusted appropriately. Furthermore, distortion of a read image in optical reading exerts influence on matters other than the aforementioned adjustment of the displacement in the printing positions in the inkjet printing apparatus.